var dtGridColumns = [{
    id : 'referenceDeviceImg',
    title : '整车和身份证的合照',
    type : 'string',
    columnClass : 'text-center',
    headerStyle : 'color:grey; white-space:nowrap;'
},{
    id : 'identityNum',
    title : '身份证号码',
    type : 'string',
    columnClass : 'text-center',
    headerStyle : 'color:grey;',
},{
    id : 'bigShelfNum',
    title : '大架子编号',
    type : 'string',
    columnClass : 'text-center',
    headerStyle : 'color:grey;',
},{
    id : 'operation',
    title : '操作',
    type : 'string',
    columnClass : 'text-center tpl-table-black-operation',
    headerStyle : 'color:grey; white-space:nowrap; padding: 0px 110px;',
    resolution:function(value, record, column, grid, dataNo, columnNo){ //此处的值（value）不直接显示
        var content = '';
        content += '<a href="#" onclick="loadPage(\'deviceInformationImg/'+record.id+'/select\');"> <i class="am-icon-pencil"></i> 编辑</a> ';
        return content;
    }
}];

var dtGridOption = {
    lang : 'zh-cn',
    ajaxLoad : true,
    check : true,
    checkWidth :'37px',
    loadURL : 'deviceInformationImg/list',
    columns : dtGridColumns,
    gridContainer : 'dtGridContainer',
    toolbarContainer : 'dtGridToolBarContainer',
    tools : '',
    pageSize : 10, //默认每页十条记录
    pageSizeLimit : [10, 20, 30] //分页选项：每页10、20\或者30条记录
};
var grid = $.fn.dlshouwen.grid.init(dtGridOption);
$(function() {
    grid.load();
    $('select').selected();
});

function search(){
    grid.parameters = new Object();
    grid.parameters['big_shelf_num'] = $("#bigShelfNum").val();
    console.log($("#bigShelfNum").val());
    grid.refresh(true);
}

function delteAll(){
    var checkId = getCheckAll(grid.getCheckedRecords());
    if(checkId!=''){
        del("transferLicense/"+checkId+"/deleteBatch",search);
    }else{
        layer.msg('请选择要删除的数据', {
            icon : 3
        });
    }
}

// function ok2(){
//     debugger
//     console.log("1");
//     grid.parameters = new Object();
//     console.log("2");
//     grid.parameters['big_shelf_num'] = $("#bigShelfNum").val();
//     console.log("3");
//     grid.refresh(true);
// }

